class KuztuscmsController < ActionController::Base
  before_filter :authenticate_for_cms!
  layout 'kuztuscms/application'

  private

  def authenticate_for_cms!
    if Kuztuscms::User.count > 0
      authenticate_user!
    else
      redirect_to :controller => :users, :action => :new
    end
  end

  def after_sign_out_path_for(resource_or_scope)
    kuztuscms.root_path
  end

  def signed_in_root_path(resource_or_scope)
    kuztuscms.root_path
  end

end
